﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site/Master/Main.Master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="ECommerce.Web.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="Site/styles/default.css" rel="stylesheet" type="text/css" />
    <style type="text/css">

#banner {position:relative; width:566px; height:186px; border:1px solid #666; overflow:hidden; z-index:2}
#banner_list img {border:0px;}
#banner_bg {position:absolute; bottom:0;background-color:#000;height:30px;filter: Alpha(Opacity=30);opacity:0.3;z-index:900;
cursor:pointer; width:478px; }
#banner_info{position:absolute; bottom:0; left:5px;height:22px;color:#fff;z-index:1001;cursor:pointer}
#banner_text {position:absolute;width:120px;z-index:1002; right:3px; bottom:3px;}
#banner ul {position:absolute;list-style-type:none;filter: Alpha(Opacity=80);opacity:0.8; border:1px solid #fff;z-index:901;
margin:0; padding:0; bottom:3px; right:5px;}
#banner ul li { padding:0px 8px;float:left;display:block;color:#FFF;border:#e5eaff 1px solid;background:#6f4f67;cursor:pointer}
#banner ul li.on { background:#900}
#banner_list a{position:absolute;} <!-- 让四张图片都可以重叠在一起-->
</style>


    <script src="Common/Js/common.js" type="text/javascript"></script>

    <script type="text/javascript">

        var lastID = '<%=InitID %>';

        function liMouseOver(id)
        {
            $("#li" + lastID + "_1").show();
            $("#li" + lastID + "_2").hide();

            $("#li" + id + "_1").hide();
            $("#li" + id + "_2").show();
            lastID = id;
        }

        $(function ()
        {
            if (lastID != "")
            {
                $("#li" + lastID + "_1").hide();
                $("#li" + lastID + "_2").show();
            }

        });

        function menu_over(index)
        {
            $("#span" + index).addClass("on");
            $("#d" + index).css("display", "");
        }

        function menu_out(index)
        {
            $("#span" + index).removeClass("on");
            $("#d" + index).css("display", "none");
        }
       
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="main">
        <div class="mainleft">
            <div class="allsort">
                <div class="atleft">
                    <div class="cakesort">
                        <p>
                            所有蛋糕分类</p>
                        <div class="iframebox" onmouseover="menu_over(1)" onmouseout="menu_out(1)">
                            <span id="span1"><a href="javascript://">连锁品牌选购</a></span>
                            <div id ="d1" class="iframelist" style="display:none;">
                                <ul>
                                     <asp:ListView ID="lv1" runat="server" GroupItemCount="2">
                                        <LayoutTemplate>
                                            <li id="groupPlaceholder" runat="server"></li>
                                        </LayoutTemplate>
                                        <GroupTemplate>
                                            <li><a id="itemPlaceholder" runat="server"></a></li>
                                        </GroupTemplate>
                                        <ItemTemplate>
                                            <a href="site/productlist.aspx?Type1=<%#Eval("Code") %>"><%#Eval("Name") %></a>
                                        </ItemTemplate>
                                    </asp:ListView>
                                </ul>
                            </div>
                        </div>
                        <div class="iframebox" onmouseover="menu_over(2)" onmouseout="menu_out(2)">
                            <span  id="span2"><a href="javascript://">材料选购</a></span>
                            <div id ="d2" class="iframelist"  style="display:none;">
                                <ul>
                                    
                                    <asp:ListView ID="lv2" runat="server" GroupItemCount="2">
                                        <LayoutTemplate>
                                            <li id="groupPlaceholder" runat="server"></li>
                                        </LayoutTemplate>
                                        <GroupTemplate>
                                            <li><a id="itemPlaceholder" runat="server"></a></li>
                                        </GroupTemplate>
                                        <ItemTemplate>
                                            <a href="site/productlist.aspx?Type3=<%#Eval("Code") %>"><%#Eval("Name") %></a>
                                        </ItemTemplate>
                                    </asp:ListView>
                                    
                                </ul>
                            </div>
                        </div>
                        <div class="iframebox" onmouseover="menu_over(3)" onmouseout="menu_out(3)">
                            <span id="span3"><a href="javascript://">价格选购</a></span>
                            <div id ="d3" class="iframelist" style="display:none;">
                                <ul>
                                    
                                     <asp:ListView ID="lv3" runat="server" GroupItemCount="2">
                                        <LayoutTemplate>
                                            <li id="groupPlaceholder" runat="server"></li>
                                        </LayoutTemplate>
                                        <GroupTemplate>
                                            <li><a id="itemPlaceholder" runat="server"></a></li>
                                        </GroupTemplate>
                                        <ItemTemplate>
                                            <a href="site/productlist.aspx?Type6=<%#Eval("Code") %>"><%#Eval("Name") %></a>
                                        </ItemTemplate>
                                    </asp:ListView>
                                </ul>
                            </div>
                        </div>
                        <!--<div class="iframebox" onmouseover="menu_over(4)" onmouseout="menu_out(4)">
                            <span id="span4"><a href="javascript://">用途选购</a></span>
                            <div id ="d4" class="iframelist" style=" display:none;">
                                <ul>
                                     <asp:ListView ID="lv4" runat="server" GroupItemCount="2">
                                        <LayoutTemplate>
                                            <li id="groupPlaceholder" runat="server"></li>
                                        </LayoutTemplate>
                                        <GroupTemplate>
                                            <li><a id="itemPlaceholder" runat="server"></a></li>
                                        </GroupTemplate>
                                        <ItemTemplate>
                                            <a href="site/productlist.aspx?Type2=<%#Eval("Code") %>"><%#Eval("Name") %></a>
                                        </ItemTemplate>
                                    </asp:ListView>
                                </ul>
                            </div>
                        </div>-->
                    </div>
                    <div class="salerank">
                        <p>
                            人气排行榜</p>
                        <ul>
                            <asp:Repeater ID="rptSaleRank" runat="server">
                            <ItemTemplate>
                                <li id='li<%#Eval("ID") %>_1' onmouseover='liMouseOver(<%#Eval("ID") %>)'><a href="javascript://" class="num"><%#Eval("Index") %></a><a href="Site/ProductDetail.aspx?ProductID<%#Eval("ID") %>" class="name"><%#Eval("Name") %></a></li>
                                <li id='li<%#Eval("ID") %>_2' style="display:none;" class="expansion">
                                    <span class="num">
                                        <div style="position: absolute; z-index: 1">
                                            <a id="div1_<%#Eval("ID") %>" href="Site/ProductDetail.aspx?ProductID=<%#Eval("ID") %>" style="position: absolute; top: 0px; left: -1px;">
                                              
                                                                    <img src="<%#Eval("SmallImageAbsPath") %>" style="width:94px; height:93px;" />

                                            </a>
                                        </div>
                                    <a class="index"><%#Eval("Index") %></a></span> <span class="name"><%#Eval("Name") %><br />
                                        <b><%#Eval("CurrentPrice","{0:c2}") %></b></span>
                                    <div class="clear">
                                    </div>
                                </li>
                            </ItemTemplate>
                            </asp:Repeater>                            
                            <!--<li><a href="javascript://" class="num">2</a><a href="javascript://" class="name">海豚恋人
                                9支红玫瑰 红色包装纸...</a></li>
                            <li class="expansion">
                                <span class="num">
                                    <div style="position: absolute; width: 20px; background-color: Blue; height: 20px;
                                        z-index: 1">
                                        <div style="position: absolute; top: 0px; left: -5px;">
                                            <img src="site/images/dpic-14.jpg" />
                                        </div>
                                    </div>
                                    <a href="javascript://">3</a></span> <span class="name">天天开心 巧克力心型蛋糕
                                    3朵巧克力玫瑰<br />
                                    <b>¥189.00</b></span>
                                <div class="clear">
                                </div>
                            </li>     -->                       
                        </ul>
                    </div>
                </div>
                <div class="atright">
                    <div id="banner" class="advertisement" style="z-index:0">
                       
                        <!--标题背景-->
                        <div id="banner_info">
                        </div>
                        <!--标题-->
                        <ul>
                            <li class="on">1</li>
                            <li>2</li>
                            <li>3</li>
                            <li>4</li>
                            <li>5</li>
                        </ul>
                        <div id="banner_list">
                              <a id="lnkHome1" runat="server" target="_blank"><img id="imgHome1" border="0" width="566" height="186" runat="server" src="" alt="" /></a>
                              <a id="lnkHome2" runat="server" target="_blank"><img id="imgHome2" border="0" width="566" height="186" runat="server" src="" alt="" /></a>
                              <a id="lnkHome3" runat="server" target="_blank"><img id="imgHome3" border="0" width="566" height="186" runat="server" src="" alt="" /></a>
                              <a id="lnkHome4" runat="server" target="_blank"><img id="imgHome4" border="0" width="566" height="186" runat="server" src="" alt="" /></a>

                              <a id="lnkHome5" runat="server" target="_blank"><img id="imgHome5" border="0" width="566" height="186" runat="server" src="" alt="" /></a>

                        </div>

                    </div>
                    <script type="text/javascript">
                        var t = n = 0, count;
                        $(document).ready(function ()
                        {
                            count = $("#banner_list a").length;
                            $("#banner_list a:not(:first-child)").hide();
                            $("#banner_info").html($("#banner_list a:first-child").find("img").attr('alt'));
                            $("#banner_info").click(function () { window.open($("#banner_list a:first-child").attr('href'), "_blank") });
                            $("#banner li").click(function ()
                            {
                                var i = $(this).text() - 1; //获取Li元素内的值，即1，2，3，4 
                                n = i;
                                if (i >= count) return;
                                $("#banner_info").html($("#banner_list a").eq(i).find("img").attr('alt'));
                                $("#banner_info").unbind().click(function () { window.open($("#banner_list a").eq(i).attr('href'), "_blank") })
                                $("#banner_list a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);
                                document.getElementById("banner").style.background = "";
                                $(this).toggleClass("on");
                                $(this).siblings().removeAttr("class");
                            });
                            t = setInterval("showAuto()", 4000);
                            $("#banner").hover(function () { clearInterval(t) }, function () { t = setInterval("showAuto()", 4000); });
                        })
                        function showAuto()
                        {
                            n = n >= (count - 1) ? 0 : ++n;
                            $("#banner li").eq(n).trigger('click');
                        }

                    </script>
                    <div class="newproduct">
                        <p>
                            <span class="name weight">新品上架</span><span class="more"><a href="site/productlist.aspx">更多...</a></span>
                        </p>
                        <div class="productlistc">
                            <asp:Repeater ID="rptNewProduct" runat="server">
                            <ItemTemplate>
                                <div class="productlist">
                                <div id="div2_<%#Eval("ID") %>">
                                   <a target="_blank" href="site/productdetail.aspx?ProductID=<%#Eval("ID") %>"><img src="<%#Eval("SmallImageAbsPath") %>" style="width:125px; height:125px;" /></a>
                               
                               </div>
                                <h1>
                                    <a target="_blank" href="site/productdetail.aspx?ProductID=<%#Eval("ID") %>"><%#Eval("Name") %></a></h1>
                                <h1>
                                    <b><%#Eval("CurrentPrice","{0:c2}") %></b></h1>
                            </div>
                            </ItemTemplate>
                            </asp:Repeater>                            
                        </div>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="hotsort">
                <p>
                    <span class="name weight">热门推荐</span><span class="more"><a href="site/productlist.aspx">更多...</a></span>
                </p>
                <div class="hotsc">
                    <div class="hotscl" style="">
                       <a id="lnkHome10" runat="server" target="_blank"><img id="imgHome10" border="0" width="212" height="322" runat="server" src="" alt="" /></a>
                    </div>
                    <div class="hotscr">
                        <div class="productlistc">
                            <asp:Repeater ID="rptRecommend" runat="server">
                            <ItemTemplate>
                                <div class="productlist">
                                    <div id="div3_<%#Eval("ID") %>">
                                         <a target="_blank" href="site/productdetail.aspx?ProductID=<%#Eval("ID") %>"><img src="<%#Eval("SmallImageAbsPath") %>" style="width:125px; height:125px;" /></a>

                                    </div>
                                    <h1>
                                        <a target="_blank" href="site/productdetail.aspx?ProductID=<%#Eval("ID") %>">
                                            <%#Eval("Name") %></a></h1>
                                    <h1>
                                        <b>
                                            <%#Eval("CurrentPrice","{0:c2}") %></b></h1>
                                </div>
                            </ItemTemplate>
                            </asp:Repeater>                           
                           
                        </div>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
        <div class="mainright">
            <div class="fastlogin">
                <a href="javascript:javascript:showForm('会员注册','site/register.aspx',378,224)">免费注册</a><a href="site/login.aspx">快速登录</a>
            </div>
            <div class="newappraise">
                <p class="weight">
                    公告活动</p>
                <ul>
                    <asp:Repeater ID="rptNews" runat="server">
                        <ItemTemplate>
                            <li><a target="_blank" href="site/ArticleDetail.aspx?ArticleID=<%#Eval("ID") %>">·<%#Eval("Name") %></a></li>
                        </ItemTemplate>
                    </asp:Repeater>
                    
                </ul>
            </div>
            <div class="advertisement1">
                 <a id="lnkHome6" runat="server" target="_blank"><img id="imgHome6" border="0" width="222" height="98" runat="server" src="" alt="" /></a>


            </div>
            <div class="advertisement1">
                  <a id="lnkHome7" runat="server" target="_blank"><img id="imgHome7" border="0" width="222" height="98" runat="server" src="" alt="" /></a>

            </div>
            <div class="newappraise">
                <p class="weight">
                    最新评价</p>
                <ul>
                    <asp:Repeater ID="rptComment" runat="server">
                        <ItemTemplate>
                          <li><a target="_blank" href="site/productdetail.aspx?ProductID=<%#Eval("ProductID") %>">·<%#Eval("Content") %></a></li>

                        </ItemTemplate>
                    </asp:Repeater>                   
                </ul>
            </div>
            <div class="advertisement2">
                <a id="lnkHome8" runat="server" target="_blank">
                    <img id="imgHome8" border="0" width="222" height="162" runat="server" src="" alt="" /></a>
            </div>
            <div class="advertisement2">
                <a id="lnkHome9" runat="server" target="_blank">
                    <img id="imgHome9" border="0" width="222" height="162" runat="server" src="" alt="" /></a>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
</asp:Content>
